--[[
 * 将获得治疗值20%的护盾值
 * [0] n 万分比
 * [1] 护盾buff的id

]]
---@class BuffEffect300038000:BaseBuffEffect
BuffEffect300038000 = ClientFight.CreateClass("BuffEffect300038000", ClientFight.BaseBuffEffect)
local t = BuffEffect300038000

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters =...;
    local result =parameters[2];
    if (not result:isDamage()) then
    return IBuffEffect.FAIL;
    end
    if (result.state ~= DamageResultTypeEnum.HEAL.id) then
    return IBuffEffect.FAIL;
    end
    local buffEffectValue = buff.buffBean.f_BuffEffectValue;
    local addHp = Utils.calcRatio(result.getDamage(), buffEffectValue[1]);
    if (addHp < 1) then
    return IBuffEffect.FAIL;
    end
    local buffModelId = buffEffectValue[2];
    BuffManager.addBuff(fight,buff.skill,buff.source,buff.target,false,buffModelId,1,addHp,0,0,0);
    SkillRoleMgr.savePathFile("[" + fight.frame + "][EFFECT]Fighter " + buff.target.fighterId + " Buff:"
    + buff.modelId + " 将获得治疗值20%的护盾值, 转化护盾值:"+addHp);
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end
t.New()